/**
 * Created by 冠东 on 2017/11/8.
 */
mainApp.config(function($urlRouterProvider,$stateProvider){
    $urlRouterProvider.otherwise("/index")
    $stateProvider
        .state('index', {
            url: '/index',
            templateUrl: 'modules/index.html',
            controller:'indexController',
            onEnter: function($log){
                $log.debug('来了index');
            },
            onExit: function($log){
                $log.debug('离开这个状态的时候显示');
            }
        })
        .state('login', {
            url: '/login',
            templateUrl: 'login.html',
            controller:'loginController',
        })

        .state('employee', {
            url: '/employee',
            templateUrl: 'modules/user-management/employee/employee-context.html',
            controller: 'empListController',

            onEnter: function($log){
                $log.debug('employee');
            },
            onExit: function($log){
                $log.debug('离开这个状态的时候显示');
            }
        })

        .state('employee-add', {
            url: '/employee/add',
            templateUrl: 'modules/user-management/employee/employee-add.html',
            controller: 'empAddController',
            //onEnter: function($log){
            //    CommonUtils.createTab("employee-add","新增员工");
            //},
        })
        .state('employee-update', {
            url: '/employee/update',
            templateUrl: 'modules/user-management/employee/employee-update.html',
            controller: 'empUpdateController',
            //onEnter: function($log){
            //    CommonUtils.createTab("employee-update","员工信息修改");
            //},
        })
        .state('empLeave', {     //员工离职
            url: '/empLeave',
            templateUrl: 'modules/user-management/empLeave/empLeave-list.html',
            controller: 'empLeaveListController',
        })
        .state('empLeave-add', {     //员工离职-新增
            url: '/empLeave/add',
            templateUrl: 'modules/user-management/empLeave/empLeave-add.html',
            controller: 'empLeaveAddController',
        })
        .state('empLeave-update', {     //员工离职-修改
            url: '/empLeave/update',
            templateUrl: 'modules/user-management/empLeave/empLeave-update.html',
            controller: 'empLeaveUpdateController',
        })
        .state('dayclear', {     //工作计划模块-日清
            url: '/dayclear',
            templateUrl: 'modules/user-management/dayclear/dayclear-list.html',
            controller: 'dayListController',
            //onEnter: function($log){
            //    CommonUtils.createTab("dayclear","今日日清清单");
            //},
            //onExit: function($log){
            //    $log.debug('离开这个状态的时候显示');
            //}
        })
        .state('dayclear-add', {     //工作计划模块-日清-新增
            url: '/dayclear/add',
            templateUrl: 'modules/user-management/dayclear/dayclear-add.html',
            controller: 'dayAddController',
            //onEnter: function($log){
            //    CommonUtils.createTab("dayclear-add","新增日清");
            //},
            //onExit: function($log){
            //    $log.debug('离开这个状态的时候显示');
            //}
        })
        .state('dayclear-update', {     //工作计划模块-日清-修改
            url: '/dayclear/update',
            templateUrl: 'modules/user-management/dayclear/dayclear-update.html',
            controller: 'dayUpdateController',
            //onEnter: function($log){
            //    CommonUtils.createTab("dayclear-update","日清清单修改");
            //},
            //onExit: function($log){
            //    $log.debug('离开这个状态的时候显示');
            //}
        })
        .state('sumweek', {     //工作计划模块-周清
            url: '/sumweek',
            templateUrl: 'modules/user-management/sumweek/sumweek-list.html',
            controller: 'weekListController',
            //onEnter: function($log){
            //    CommonUtils.createTab("sumweek","周清清单");
            //},
            //onExit: function($log){
            //    $log.debug('离开这个状态的时候显示');
            //}
        })
        .state('sumweek-add', {     //工作计划模块-周清
            url: '/sumweek/add',
            templateUrl: 'modules/user-management/sumweek/sumweek-add.html',
            controller: 'weekAddController',
            //onEnter: function($log){
            //    CommonUtils.createTab("sumweek-add","周清清单增加");
            //},
            //onExit: function($log){
            //    $log.debug('离开这个状态的时候显示');
            //}
        })
        .state('sumweek-update', {     //工作计划模块-周清
            url: '/sumweek/update',
            templateUrl: 'modules/user-management/sumweek/sumweek-update.html',
            controller: 'weekUpdateController',
            //onEnter: function($log){
            //    CommonUtils.createTab("sumweek-update","周清清单修改");
            //},
            //onExit: function($log){
            //    $log.debug('离开这个状态的时候显示');
            //}
        })
        .state('depart', {     //部门管理模块
            url: '/depart',
            templateUrl: 'modules/user-management/depart/depart-list.html',
            controller: 'departListController',
            //onEnter: function($log){
            //    CommonUtils.createTab("depart","部门管理");
            //},
            //onExit: function($log){
            //    $log.debug('离开这个状态的时候显示');
            //}
        })
        .state('depart-add', {     //部门管理模块-新增
            url: '/depart/add',
            templateUrl: 'modules/user-management/depart/depart-add.html',
            controller: 'departAddController',
            //onEnter: function($log){
            //    CommonUtils.createTab("depart-add","部门新增");
            //},
            //onExit: function($log){
            //    $log.debug('离开这个状态的时候显示');
            //}
        })
        .state('depart-update', {     //部门管理模块-修改
            url: '/depart/update',
            templateUrl: 'modules/user-management/depart/depart-update.html',
            controller: 'departUpdateController',
            //onEnter: function($log){
            //    CommonUtils.createTab("depart-update","部门修改");
            //},
            //onExit: function($log){
            //    $log.debug('离开这个状态的时候显示');
            //}
        })
        .state('reward', {     //奖罚管理
            url: '/reward',
            templateUrl: 'modules/user-management/reward/reward-list.html',
            controller: 'rewardListController',
            //onEnter: function($log){
            //    CommonUtils.createTab("reward","部门修改");
            //},
            //onExit: function($log){
            //    $log.debug('离开这个状态的时候显示');
            //}
        })
        .state('reward-add', {     //奖罚管理
            url: '/reward/add',
            templateUrl: 'modules/user-management/reward/reward-add.html',
            controller: 'rewardAddController',
            //onEnter: function($log){
            //    CommonUtils.createTab("reward-add","部门修改");
            //},
            //onExit: function($log){
            //    $log.debug('离开这个状态的时候显示');
            //}
        })
        .state('reward-update', {     //奖罚管理
            url: '/reward/update',
            templateUrl: 'modules/user-management/reward/reward-update.html',
            controller: 'rewardUpdateController',
            //onEnter: function($log){
            //    CommonUtils.createTab("reward-update","部门修改");
            //},
            //onExit: function($log){
            //    $log.debug('离开这个状态的时候显示');
            //}
        })
        .state('performance-evaluation', {     //绩效考核
            url: '/performance-evaluation',
            templateUrl: 'modules/user-management/performance-evaluation/performance-evaluation-list.html',
            controller: 'PEListController',
        })
        .state('performance-evaluation-add', {     //绩效考核
            url: '/performance-evaluation/add',
            templateUrl: 'modules/user-management/performance-evaluation/performance-evaluation-add.html',
            controller: 'PEAddController',
        })
        .state('performance-evaluation-update', {     //绩效考核
            url: '/performance-evaluation/update',
            templateUrl: 'modules/user-management/performance-evaluation/performance-evaluation-update.html',
            controller: 'PEUpdateController',
        })
        .state('attendance', {     //考勤管理
            url: '/attendance',
            templateUrl: 'modules/user-management/attendance/attendance-list.html',
            controller: 'amListController',
        })
        .state('attendance-add', {     //考勤管理
            url: '/attendance/add',
            templateUrl: 'modules/user-management/attendance/attendance-add.html',
            controller: 'amAddController',
        })
        .state('personal', {     //个人中心
            url: '/personal',
            templateUrl: 'modules/user-management/personal/personal-list.html',
            controller: 'personalListController',
        })
});

